This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Could something like this work? I see where the new document is created BUT what happens after the new document is created. Our current agent is extremely inefficient because it deletes all docs then runs something like this (except ODBCConnection...). What would I insert to update the document if already present? I'm assuming the key would be the customer # in this case (only unique ID). If no document exists with customer # then create new document. Thanks all... feels like I am close to some kind of solution. Just noticed that this sample just dims newdoc... where is the rest!?!
Dim session As New NotesSession
Dim db As notesdatabase
Set db = session.currentdatabase
Dim LcConnection As New LCConnection ("db2")
LcConnection.Database = "DBNAME"
LcConnection.Userid = "userid"
LcConnection.Password = "password"
LcConnection.Fieldnames = "STOCSNO, STOCSCL, STOCSSC, STOCSNM,..."
LcConnection.Connect
If LcConnection.isconnected Then
Print "DB CONNECTION IS OK!"
Else
Print "DB IS NOT CONNECTED!"
End If
Dim LcResultFieldList As LCFieldList
Set LcResultFieldList = New LCFieldList
Call LcConnection.Execute({SELECT XXXXXXXXX FROM YYYYYY WHERE ZZZZZ)}, LcResultFieldList)
Dim LcField1 As LCField
Dim LcField2 As LCField
Dim LcField3 As LCField
Dim LcField4 As LCField
Set LcField1 = LcResultFieldList.Lookup("XXX1")
Set LcField2 = LcResultFieldList.Lookup("XXX2")
Set LcField3 = LcResultFieldList.Lookup("XXX3")
Set LcField4 = LcResultFieldList.Lookup("XXX4")